
#ifdef __STDC_LIB_EXT1__
#define HAS_STRCAT_S 1
#else
#define HAS_STRCAT_S 0

#include "stddef.h"
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
int sprintf_s(char* buffer, size_t size, const char* format,...) {
    va_list args;
    va_start(args, format);
    int result = vsnprintf(buffer, size, format, args);
    va_end(args);
    return result;
}
#endif